// function match(reg,str) {
//     return str.match(reg);
// }


const _ = require('lodash')

// function matchNum(reg, str) {
//     return str.match(reg);
// }

const match = _.curry(function (reg, str) {
    return str.toString().match(reg)
})
const haveNumber = match(/\d+/g);
console.log(haveNumber('qwe123'))

const filter = _.curry( (func, arr)=> arr.filter(func))
console.log(filter(haveNumber, ['asd546qwe', 'asdq']))

const findNumber = filter(haveNumber)

const arrTemp=[1,5,354,231,321,'sdf','qwr1234e','gdf2','asdasddfg']
const result = findNumber(arrTemp)

console.log(result)
